#ifndef MAXTRIX_KEY_H
#define MAXTRIX_KEY_H

#include "stm32f1xx_hal.h"

#define ROW1_PORT GPIOB
#define ROW2_PORT GPIOB
#define ROW3_PORT GPIOB
#define ROW4_PORT GPIOB

#define ROW1_PIN GPIO_PIN_6
#define ROW2_PIN GPIO_PIN_7
#define ROW3_PIN GPIO_PIN_8
#define ROW4_PIN GPIO_PIN_9

#define COL1_PORT GPIOB
#define COL2_PORT GPIOB
#define COL3_PORT GPIOB

#define COL1_PIN GPIO_PIN_1
#define COL2_PIN GPIO_PIN_4
#define COL3_PIN GPIO_PIN_5

void matrix_key_init(void);
void matrix_scan();

#endif         